Importing library

Thresholding function definition